#ifndef _math_hpp_
#define _math_hpp_

/** \file math.hpp
 *  \author Adrian Schweizer
 *  \created  $Do 23 Aug 10:32:12 pm CEST 2007 schwadri@SchwadriComp.local$
 *  \modified $Do 30 Aug 07:15:11 pm CEST 2007 schwadri@SchwadriComp.local$
 */

#include <algorithm>

namespace core {

    namespace math {

        template<class T>
            T   clamp(T t, T t0, T t1)
            {
                using std::min;
                using std::max;
                return min(max(t,t0),t1);
            }

    } // namespace math

} // namespace core

#endif // _math_hpp_
